package com.whc.user.util;


public class BloomFilterUtil {
    public static final String whiteUserHead="whitelistUser";
    public static long getIndex(Integer userId){
        String uid=whiteUserHead+userId;
        int hashValue = Math.abs(uid.hashCode());
        //hashValue和2的32次方取余后，获得对应的下标坑位
        return (long) (hashValue % Math.pow(2, 32));
    }
}
